package com.tn.wservice;

import java.util.HashMap;

import com.tn.service.dwr.jaxws.CreateOrSavePurchaseOrder;
import com.tn.service.dwr.jaxws.CreateOrSavePurchaseOrderResponse;
import com.tn.xfer.DwrResponse;

public class PurchaseOrderWS implements IYSNWebService {
	@BusinessObject(value = CreateOrSavePurchaseOrder.class) //method request object
	public Object createOrSavePurchaseOrder(HashMap<ParamKey, Object> map) {
		CreateOrSavePurchaseOrder input = (CreateOrSavePurchaseOrder) map
				.get(ParamKey.BUSINESS_OBJECT);
		POAdapter adapter = new POAdapter(); //Login
		DwrResponse resp = adapter.createOrderSavePurchaseOrder(
				input.getArg0(), input.isArg1());
		CreateOrSavePurchaseOrderResponse ret = new CreateOrSavePurchaseOrderResponse();
		ret.setReturn(resp);

		return ret;
	}
}
